package com.cci.kangdao.dto.response;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.cci.kangdao.utilTool.tree.TreeNode;

import java.util.List;

public class DictionariesTree implements TreeNode {
    @JSONField(name = "ID")
    private Long ID;
    @JSONField(name = "DInt")
    private Integer DInt;
    @JSONField(name = "DValue")
    private String DValue;
    @JSONField(name = "Remark")
    private String Remark;
    @JSONField(name = "TreeList")
    private List<DictionariesTree> TreeList;
    @JSONField(name = "Data")
    private JSONObject data ;

    //是否必填 0：非必填 1：必填
    private Integer required = 0;

    public Integer getRequired() {
        return required;
    }

    public void setRequired(Integer required) {
        this.required = required;
    }

    public JSONObject getData() {
        return data;
    }

    public void setData(JSONObject data) {
        this.data = data;
    }

    @Override
    public Object id() {
        return this.DValue;
    }

    @Override
    public Object parentId() {
        return Remark;
    }

    @Override
    public Boolean root() {
        return this.Remark.equals("Tree");
    }

    @Override
    public List<? extends TreeNode> children() {
        return this.TreeList;
    }

    @Override
    public void putChildren(List children) {
        this.TreeList = children;
    }

    public Integer getDInt() {
        return DInt;
    }

    public void setDInt(Integer DInt) {
        this.DInt = DInt;
    }

    public String getDValue() {
        return DValue;
    }

    public void setDValue(String DValue) {
        this.DValue = DValue;
    }

    public String getRemark() {
        return Remark;
    }

    public void setRemark(String remark) {
        Remark = remark;
    }

    public Long getID() {
        return ID;
    }

    public void setID(Long ID) {
        this.ID = ID;
    }

    public List<DictionariesTree> getTreeList() {
        return TreeList;
    }

    public void setTreeList(List<DictionariesTree> treeList) {
        TreeList = treeList;
    }
}
